import {ThemeContent,ThemeSize} from "./ThemeContent";

export const Header = props=>(
    <ThemeContent.Consumer>
        {
            theme =>(
                // console.log(theme)
                <header style={{backgroundColor:theme}}>
                    <h3>背景颜色变换</h3>
                    <ThemeSize.Consumer>
                       {size=><h3 style={{fontSize:size}}>字体大小变化</h3>}
                    </ThemeSize.Consumer>
                </header>
            )
        }
    </ThemeContent.Consumer>
)